'use strict';
function compare(arr1,arr2){
  if(arr1<arr2){
    return 1;
  }
  else if(arr1>arr2){
    return -1;
  }
  else{
    return 0;
  }
}
var rank_asc = function(collection){
  collection.sort(compare);
  console.log(collection);
  return collection;
}

module.exports = rank_asc;
rank_asc([3, 2, 4, 5, 6]);
